﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using WiTeach.CourseManagement.View;

namespace WiTeach.ClassManagement.View
{
    /// <summary>
    /// TeachingVideo.xaml 的交互逻辑
    /// </summary>
    public partial class TeachingVideo : Page
    {
        public int lessonID;
        public int classHourID;

        public TeachingVideo(int lessonID, int classHourID)
        {
            InitializeComponent();
            // 修改页面背景主题
            ImageBrush brush = new ImageBrush();
            brush.Stretch = Stretch.Fill;
            brush.ImageSource = new BitmapImage(new Uri(App.backgroundImage, UriKind.RelativeOrAbsolute));
            this.Background = brush;
            this.lessonID = lessonID;
            this.classHourID = classHourID;
        }
        private void backHome(object sender, RoutedEventArgs e)
        {
            CourseIndex courseIndex = new CourseIndex();
            this.NavigationService.Navigate(courseIndex);
        }

        private void backPreLevel(object sender, RoutedEventArgs e)
        {
            this.NavigationService.GoBack();
        }
         
        private void ProgramWriting(object sender, RoutedEventArgs e)
        {
            // 跳转至程序编写页面
            ProgramWriting programWritingPage = new ProgramWriting(lessonID, classHourID);
            this.NavigationService.Navigate(programWritingPage);
        }

        private void ProgramRecording(object sender, RoutedEventArgs e)
        {
            ProgramRecording programRecording = new ProgramRecording(lessonID, classHourID);
            this.NavigationService.Navigate(programRecording);
        }

        private void TeachingPhoto(object sender, RoutedEventArgs e)
        {
            TeachingPhoto teachingPhoto = new TeachingPhoto(lessonID, classHourID);
            this.NavigationService.Navigate(teachingPhoto);
        }
    }
}
